Psst: Open the JavaScript Console and try to play around with these functions:
fib(20) // should return 6765 after 13529 steps
memoizedFib(20) // should return 6765 after 39 steps (or 1 step if
the number has already been calculated)
tabulatedFib(20) // should return 6765 after 18 steps (or 1 step if
the number has already been calculated)
coinChange([1, 5, 10, 25], 1) // should return 1
coinChange([1, 5, 10, 25], 25) // should return 13
coinChange([1, 5, 10, 25], 45) // should return 39
coinChange([1, 5, 10, 25], 100) // should return 242
coinChange([1, 5, 10, 25], 14511) // should return 409222339
minCoinChange([1, 2, 3, 4, 5], 11) // should return [5, 5, 1]
minCoinChange([5, 10, 15, 20, 25], 85) // should return [25, 25, 25,
10]
minCoinChange([1, 5, 6, 9], 11) // should return [9, 1, 1]
minCoinChangeOptimal([1, 2, 3, 4, 5], 11) // should return [5, 5, 1]
minCoinChangeOptimal([5, 10, 15, 20, 25], 85) // should return [25,
25, 25, 10]
minCoinChangeOptimal([1, 5, 6, 9], 11) // should return [6, 5]
minCoinChangeTabulated([1, 2, 3, 4, 5], 11) // should return [5, 5, 1]
minCoinChangeTabulated([5, 10, 15, 20, 25], 85) // should return [25,
25, 25, 10]
minCoinChangeTabulated([1, 5, 6, 9], 11) // should return [6, 5]